package com.wisemoresystem.seal.action.task;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wisemoresystem.seal.base.action.ProjBaseAction;
import com.wisemoresystem.seal.service.TaskService;
import com.wisemoresystem.seal.util.json.JsonTools;
import com.wisemoresystem.seal.util.task.TaskTools;
import com.wisemoresystem.seal.web.WebTools;
/**
 * 任务数
 * @author Administrator
 *
 */
@Controller("ixTask")
@Scope("prototype")
@RequestMapping("/ix/task")
public class TaskAction extends ProjBaseAction {

	@Autowired
	private TaskService taskService;

	@RequestMapping("/msg")
	@ResponseBody
	public String msg() {
		Set<String> codes = WebTools.getCurrentRoleCodes();
		List<Map<String, String>> list = TaskTools.loopTask(codes);

		return JsonTools.toJson(list);

	}
}
